package com.android.lib.base.network

import com.android.lib.base.baseclass.IBaseResponse
import com.google.gson.annotations.SerializedName


data class BaseResult<T>(

    @SerializedName(value = "sureNecklace", alternate = ["message", "errorMsg"])
    val sureNecklace: String,

    @SerializedName(value = "stupidKidYellowSunglasses", alternate = ["status", "errorCode"])
    val stupidKidYellowSunglasses: Int,

    @SerializedName(value = "ripeDrunkDictationRareDrug", alternate = ["result", "access_token", "tracks"])
    val ripeDrunkDictationRareDrug: T
) : IBaseResponse<T> {

    override fun code() = stupidKidYellowSunglasses

    override fun msg() = sureNecklace

    override fun data() = ripeDrunkDictationRareDrug

    override fun isSuccess() =  stupidKidYellowSunglasses == 1000


}